define(['TimeInput'],function(TimeInput){
	//文本框提示
	var YearMonthInput=function(initConfig){
		var selector=this;
		var thisYear = new Date().getFullYear();
		TimeInput.call(selector,{
			hourText:i18next.t('input.year'),//'年'
			hourNumberOption:{
				min:thisYear-30,
				max:thisYear,
				interval:1
			},
			hourWidth: 70,
			minuteText:i18next.t('input.month'),//'月'
			minuteNumberOption: {
				min:1,
				max:12,
				interval:1
			},
		});
		selector.value=function(v){
			if(v == undefined) {
				return new Date(this.hourSelectInput.value(), this.minuteSelectInput.value()-1).getTime()
			} else {
				selector.hourSelectInput.value(new Date(v).getFullYear());
				selector.minuteSelectInput.value(new Date(v).getMonth() + 1);
			}

		}

	}
	window.YearMonthInput = YearMonthInput;
	return YearMonthInput;
})
